// TestModal.cpp : implementation file
//

#include "stdafx.h"
#include "mainApp.h"
#include "global_.h"
//#include "PCI8333.H"
#include <stdlib.h>
#include "TestModal.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// TestModal dialog


TestModal::TestModal(CWnd* pParent /*=NULL*/)
	: CDialog(TestModal::IDD, pParent)
{
	//{{AFX_DATA_INIT(TestModal)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void TestModal::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(TestModal)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(TestModal, CDialog)
	//{{AFX_MSG_MAP(TestModal)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
	ON_BN_CLICKED(IDC_BUTTON5, OnButton5)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// TestModal message handlers

BOOL TestModal::OnInitDialog() 
{
	CDialog::OnInitDialog();
	char strs[200];
	u.drv.lockin.pgetall(strs);
	GetDlgItem(IDC_EDIT6)->SetWindowTextA(strs);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void TestModal::OnButton1() 
{
	CString num="";
	GetDlgItem(IDC_EDIT1)->GetWindowText(num);
		//funk(1,1,2,atoi(num));
	u.drv.pciset(1,atoi(num));

}

void TestModal::OnButton2() 
{
	CString num="";
	GetDlgItem(IDC_EDIT2)->GetWindowText(num);
	//funk(1,2,2,atoi(num));
	u.drv.pciset(2,atoi(num));
}

void TestModal::OnButton5() 
{
	CDialog::OnCancel();	
}
